package com.eystar.ext.plugin.crate.db;

import com.eystar.ext.kit.page.PageOrder;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.DbPro;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;

public class CrateDb extends Db {
	
	public static DbPro use() {
		return Db.use("crate");
	}

	public SqlPara getSqlPara(String key,Record record,PageOrder order){
		record.set("order", order.getOrder());
		record.set("orderType", order.getOrderType());
		SqlPara para = getSqlPara(key, record);
		para.addPara(order);
		return getSqlPara(key, record);
	}
}
